package ch.sv7.tool.dbmanager.types;

import java.util.HashMap;
import java.util.Map;

/**
 * TODO: Document me!
 *
 * @author svt
 *
 */
public class SybaseStaticTypesInfo implements TypesInfo {

	private Map types = new HashMap();
	
	/**
	 * 
	 */
	public SybaseStaticTypesInfo() {
		types.put("double precision", new TypeInfo(
				"double precision"/*typeName*/, 
				8/*jdbcType*/, 
				15/*precision*/, 
				null/*literalPrefix*/, 
				null/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)2/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"double precision"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				10/*numPrecisionRadix*/
			));
			types.put("bigint", new TypeInfo(
				"bigint"/*typeName*/, 
				-5/*jdbcType*/, 
				19/*precision*/, 
				null/*literalPrefix*/, 
				null/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)2/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"bigint"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("time", new TypeInfo(
				"time"/*typeName*/, 
				92/*jdbcType*/, 
				12/*precision*/, 
				"'"/*literalPrefix*/, 
				"'"/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)3/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"time"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("numeric", new TypeInfo(
				"numeric"/*typeName*/, 
				2/*jdbcType*/, 
				38/*precision*/, 
				null/*literalPrefix*/, 
				null/*literalSuffix*/, 
				"precision,scale"/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)2/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"numeric"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)38/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("date", new TypeInfo(
				"date"/*typeName*/, 
				91/*jdbcType*/, 
				10/*precision*/, 
				"'"/*literalPrefix*/, 
				"'"/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)3/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"date"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("univarchar", new TypeInfo(
				"univarchar"/*typeName*/, 
				12/*jdbcType*/, 
				4096/*precision*/, 
				"'"/*literalPrefix*/, 
				"'"/*literalSuffix*/, 
				"max length"/*createParams*/, 
				(short)1/*nullable*/, 
				true/*caseSensitive*/, 
				(short)3/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"varchar"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("decimal", new TypeInfo(
				"decimal"/*typeName*/, 
				3/*jdbcType*/, 
				38/*precision*/, 
				null/*literalPrefix*/, 
				null/*literalSuffix*/, 
				"precision,scale"/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)2/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"decimal"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)38/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("char", new TypeInfo(
				"char"/*typeName*/, 
				1/*jdbcType*/, 
				4096/*precision*/, 
				"'"/*literalPrefix*/, 
				"'"/*literalSuffix*/, 
				"length"/*createParams*/, 
				(short)1/*nullable*/, 
				true/*caseSensitive*/, 
				(short)3/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"char"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("unichar", new TypeInfo(
				"unichar"/*typeName*/, 
				1/*jdbcType*/, 
				4096/*precision*/, 
				"'"/*literalPrefix*/, 
				"'"/*literalSuffix*/, 
				"length"/*createParams*/, 
				(short)1/*nullable*/, 
				true/*caseSensitive*/, 
				(short)3/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"char"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("double precis", new TypeInfo(
				"float"/*typeName*/, 
				8/*jdbcType*/, 
				8/*precision*/, 
				null/*literalPrefix*/, 
				null/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)2/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"float"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				10/*numPrecisionRadix*/
			));
			types.put("smalldatetime", new TypeInfo(
				"smalldatetime"/*typeName*/, 
				93/*jdbcType*/, 
				16/*precision*/, 
				"'"/*literalPrefix*/, 
				"'"/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)3/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"smalldatetime"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("image", new TypeInfo(
				"image"/*typeName*/, 
				-4/*jdbcType*/, 
				2147483647/*precision*/, 
				"0x"/*literalPrefix*/, 
				null/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)1/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"image"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("float", new TypeInfo(
				"float"/*typeName*/, 
				8/*jdbcType*/, 
				8/*precision*/, 
				null/*literalPrefix*/, 
				null/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)2/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"float"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				10/*numPrecisionRadix*/
			));
			types.put("timestamp", new TypeInfo(
				"timestamp"/*typeName*/, 
				-3/*jdbcType*/, 
				8/*precision*/, 
				"'"/*literalPrefix*/, 
				"'"/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)3/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"timestamp"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("real", new TypeInfo(
				"real"/*typeName*/, 
				7/*jdbcType*/, 
				7/*precision*/, 
				null/*literalPrefix*/, 
				null/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)2/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"real"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				10/*numPrecisionRadix*/
			));
			types.put("bit", new TypeInfo(
				"bit"/*typeName*/, 
				-7/*jdbcType*/, 
				1/*precision*/, 
				null/*literalPrefix*/, 
				null/*literalSuffix*/, 
				null/*createParams*/, 
				(short)0/*nullable*/, 
				false/*caseSensitive*/, 
				(short)2/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"bit"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("nvarchar", new TypeInfo(
				"nvarchar"/*typeName*/, 
				12/*jdbcType*/, 
				4096/*precision*/, 
				"'"/*literalPrefix*/, 
				"'"/*literalSuffix*/, 
				"max length"/*createParams*/, 
				(short)1/*nullable*/, 
				true/*caseSensitive*/, 
				(short)3/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"nvarchar"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("unitext", new TypeInfo(
				"unitext"/*typeName*/, 
				-1/*jdbcType*/, 
				2147483647/*precision*/, 
				"'"/*literalPrefix*/, 
				"'"/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				true/*caseSensitive*/, 
				(short)1/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"unitext"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("varbinary", new TypeInfo(
				"varbinary"/*typeName*/, 
				-3/*jdbcType*/, 
				4096/*precision*/, 
				"0x"/*literalPrefix*/, 
				null/*literalSuffix*/, 
				"max length"/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)2/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"varbinary"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("nchar", new TypeInfo(
				"nchar"/*typeName*/, 
				1/*jdbcType*/, 
				4096/*precision*/, 
				"'"/*literalPrefix*/, 
				"'"/*literalSuffix*/, 
				"length"/*createParams*/, 
				(short)1/*nullable*/, 
				true/*caseSensitive*/, 
				(short)3/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"nchar"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("unsigned smallint", new TypeInfo(
				"unsigned smallint"/*typeName*/, 
				5/*jdbcType*/, 
				5/*precision*/, 
				null/*literalPrefix*/, 
				null/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)0/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"usmallint"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("varchar", new TypeInfo(
				"varchar"/*typeName*/, 
				12/*jdbcType*/, 
				4096/*precision*/, 
				"'"/*literalPrefix*/, 
				"'"/*literalSuffix*/, 
				"max length"/*createParams*/, 
				(short)1/*nullable*/, 
				true/*caseSensitive*/, 
				(short)3/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"varchar"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("money", new TypeInfo(
				"money"/*typeName*/, 
				3/*jdbcType*/, 
				19/*precision*/, 
				"$"/*literalPrefix*/, 
				null/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)2/*searchable*/, 
				false/*unsigned*/, 
				true/*moneyValue*/, 
				false/*autoIncrement*/, 
				"money"/*localTypeName*/, 
				(short)4/*minScale*/, 
				(short)4/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("extended type", new TypeInfo(
				"extended type"/*typeName*/, 
				1111/*jdbcType*/, 
				2147483647/*precision*/, 
				"'"/*literalPrefix*/, 
				"'"/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				true/*caseSensitive*/, 
				(short)1/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"java.lang.Object"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("int", new TypeInfo(
				"int"/*typeName*/, 
				4/*jdbcType*/, 
				10/*precision*/, 
				null/*literalPrefix*/, 
				null/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)2/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"int"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("smallmoney", new TypeInfo(
				"smallmoney"/*typeName*/, 
				3/*jdbcType*/, 
				10/*precision*/, 
				"$"/*literalPrefix*/, 
				null/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)2/*searchable*/, 
				false/*unsigned*/, 
				true/*moneyValue*/, 
				false/*autoIncrement*/, 
				"smallmoney"/*localTypeName*/, 
				(short)4/*minScale*/, 
				(short)4/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("unsigned int", new TypeInfo(
				"unsigned int"/*typeName*/, 
				4/*jdbcType*/, 
				10/*precision*/, 
				null/*literalPrefix*/, 
				null/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)0/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"uint"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("text", new TypeInfo(
				"text"/*typeName*/, 
				-1/*jdbcType*/, 
				2147483647/*precision*/, 
				"'"/*literalPrefix*/, 
				"'"/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				true/*caseSensitive*/, 
				(short)1/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"text"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("datetime", new TypeInfo(
				"datetime"/*typeName*/, 
				93/*jdbcType*/, 
				23/*precision*/, 
				"'"/*literalPrefix*/, 
				"'"/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)3/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"datetime"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("smallint", new TypeInfo(
				"smallint"/*typeName*/, 
				5/*jdbcType*/, 
				5/*precision*/, 
				null/*literalPrefix*/, 
				null/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)2/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"smallint"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("unsigned bigint", new TypeInfo(
				"unsigned bigint"/*typeName*/, 
				-5/*jdbcType*/, 
				20/*precision*/, 
				null/*literalPrefix*/, 
				null/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)0/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"ubigint"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("binary", new TypeInfo(
				"binary"/*typeName*/, 
				-2/*jdbcType*/, 
				4096/*precision*/, 
				"0x"/*literalPrefix*/, 
				null/*literalSuffix*/, 
				"length"/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)2/*searchable*/, 
				false/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"binary"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));
			types.put("tinyint", new TypeInfo(
				"tinyint"/*typeName*/, 
				-6/*jdbcType*/, 
				3/*precision*/, 
				null/*literalPrefix*/, 
				null/*literalSuffix*/, 
				null/*createParams*/, 
				(short)1/*nullable*/, 
				false/*caseSensitive*/, 
				(short)2/*searchable*/, 
				true/*unsigned*/, 
				false/*moneyValue*/, 
				false/*autoIncrement*/, 
				"tinyint"/*localTypeName*/, 
				(short)0/*minScale*/, 
				(short)0/*maxScale*/, 
				0/*numPrecisionRadix*/
			));

	}

	public TypeInfo getTypeInfo(String typeName) {
		return (TypeInfo)types.get(typeName);
	}

	public String[] getTypeNames() {
		return (String[])types.keySet().toArray(new String[types.size()]);
	}

}
